#include "SQLTable.h"
#include "../RealObject/Receiption.h"

#define BILL_INPUT		0
#define BILL_OUT		1
#define BILL_TRANS		2

class CEntryReceiptionTbl : public CSqlTable
{
public:
	CEntryReceiptionTbl();
public:
	static int  getMaxCode(int nTypeBill);
	static bool addNewReceiption(const CReceiption* pReceiption);
	static CReceiption* getReceiption(CString sCode,int nTypeBill);

	static vector<CReceiption*> getListReceiption(CString sDateInput,CString sDateEnd,int nTypeBill);

	static bool addOutputBill(CString sCode,CString sCodeStaff, CString sCodeCustomer,CString sDate, CString sListProduct);
	static bool addTransferBill(CString sCode,CString sCodeStaffSend, CString sCodeStaffCatch,CString sStoreSource,CString sStoreTarget,CString sDate, CString sListProduct);
};